package com.test.kotlin04

fun forEachTest(){
    val list = listOf("Jason","Jack","Jacky")
    for(s in list){
        println(s)
    }

    list.forEach{
        println(it)
    }

    list.forEachIndexed{
        index, item ->
        println("$index,$item")
    }

    val (origin,_,proxy) = list
    println("解构：$origin,$proxy")

}

fun main(){
    forEachTest()
}
